package com.zhongkun.datahome.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongkun.datahome.service.domain.AppointmentTimeSlot;
import com.zhongkun.datahome.service.domain.CommonFile;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 预约时间段配置表Mapper接口
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
public interface AppointmentTimeSlotMapper extends BaseMapper<AppointmentTimeSlot> {

    @Update("update appointment_time_slot set del_flag = 1 where appointment_id = #{appointmentId}")
    int deleteByAppointmentId(@Param("appointmentId") Long appointmentId);

    @Select("select * from appointment_time_slot where appointment_id = #{appointmentId} and del_flag = 0")
    List<AppointmentTimeSlot> selectByAppointmentId(@Param("appointmentId") Long appointmentId);
}
